<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/WEB-INF/sys/include/taglib.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>修改设备信息</title>
<%@ include file="/WEB-INF/sys/include/css.jsp"%>
</head>
<body>
<form id="form" action="${path}/shebei/update.json" method="post">
<div class="form">
	<div class="group">
		<div class="label">*设备名称:</div>
		<div class="item"><input type="text" name="name" id="name" maxlength="20" value="${shebei.name}"/></div>
	</div>
	<div class="group">
		<div class="label">设备位置:</div>
		<div class="item"><input type="text" name="address" id="address" maxlength="50" value="${shebei.address}"/></div>
	</div>
	<div class="group">
		<div class="label">*设备IP:</div>
		<div class="item"><input type="text" name="ip" id="ip" maxlength="50" value="${shebei.ip}"/></div>
	</div>
	<div class="group">
		<div class="label">*设备端口:</div>
		<div class="item"><input type="text" name="port" id="port" maxlength="50" value="${shebei.port}"/></div>
	</div>
	<div class="group">
		<div class="label">*设备通道号:</div>
		<div class="item"><input type="text" name="alleyway" id="alleyway" maxlength="50" value="${shebei.alleyway}"/></div>
	</div>
	<div class="group">
		<div class="label">设备用户名:</div>
		<div class="item"><input type="text" name="username" id="username" maxlength="50" value="${shebei.username}"/></div>
	</div>
	<div class="group">
		<div class="label">设备密码:</div>
		<div class="item"><input type="text" name="password" id="password" maxlength="50" value="${shebei.password}"/></div>
	</div>
	<div class="group">
		<div class="label">设备品牌:</div>
		<div class="item"><input type="text" name="brand" id="brand" maxlength="50" value="${shebei.brand}"/></div>
	</div>
	<div class="group">
		<div class="label">*设备类型:</div>
		<div class="item">
			<input type="radio" id="shetype0" name="shetype" value="0" ${shebei.shetype=='0'?'checked="checked"':'' } /><label for="shetype0" class="label">枪机</label>
			<input type="radio" id="shetype1" name="shetype" value="1" ${shebei.shetype=='1'?'checked="checked"':'' } /><label for="shetype1" class="label">球机</label>
		</div>
	</div>
	<div class="group">
		<div class="label">设备型号:</div>
		<div class="item"><input type="text" name="model" id="model" maxlength="50" value="${shebei.model}"/></div>
	</div>
	<div class="group">
		<div class="label">备注:</div>
		<div class="item"><textarea id="remark" name="remark">${shebei.remark}</textarea></div>
	</div>
	<div class="buttons">
		<button class="highlight" id="submit1" type="button">确定</button>
		<button type="button" id="cancel1">取消</button>
		<input type="hidden" id="parkid" name="parkid" value="${parkid}" />
		<input type="hidden" id="sheid" name="sheid" value="${shebei.sheid}" />
	</div>
</div>
</form>
<%@ include file="/WEB-INF/sys/include/script.jsp" %>
<script type="text/javascript">
$(function() {
	$("#form").ligerForm({inputWidth: 300});
	
	verifyForm("form", {}, function(){
		$("#form").ajaxForm(function(data){
			UiUtil.isSuccess(data, "修改设备信息成功", function(){
				UiUtil.closeForm(true);
			});
		});
	});
	
	$("#submit1").click(function(){
		UiUtil.lockButton('submit1');
		$("#form").submit();
	});

	$("#cancel1").click(function(){
		UiUtil.closeForm();
	});
	
});
</script>
</body>
</html>